import { useAxios } from '@/hooks/web/useAxios'
import { QtOriginalVO,QtOriginalPageReqVO,QtOriginalExcelReqVO } from './types'

const request = useAxios()

// 查询原水记录列表
export const getQtOriginalPageApi = async (params: QtOriginalPageReqVO) => {
    return await request.get({ url: '/water/qt-original/page', params })
}

// 查询原水记录详情
export const getQtOriginalApi = async (id: number) => {
    return await request.get({ url: '/water/qt-original/get?id=' + id })
}

// 新增原水记录
export const createQtOriginalApi = async (data: QtOriginalVO) => {
    return await request.post({ url: '/water/qt-original/create', data })
}

// 修改原水记录
export const updateQtOriginalApi = async (data: QtOriginalVO) => {
    return await request.put({ url: '/water/qt-original/update', data })
}

// 删除原水记录
export const deleteQtOriginalApi = async (id: number) => {
    return await request.delete({ url: '/water/qt-original/delete?id=' + id })
}

// 导出原水记录 Excel
export const exportQtOriginalApi = async (params: QtOriginalExcelReqVO) => {
    return await request.download({ url: '/water/qt-original/export-excel', params })
}
